<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>君放心APP下载</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}"/>
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}"/>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">

    <link rel="stylesheet" type="text/css" href="css/jquery.jslides.css" media="screen"/>
    <link rel="stylesheet" type="text/css" href="css/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="css/mui.min.css"/>
    <script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="js/jquery.jslides.js"></script>

    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
        }

        .bg {
            width: 100%;
            height: 85vh;
            padding-top: 15vh;
            background: url('images/bg.png') no-repeat;
            background-size: 100% 100%;
        }

        .logo {
            width: 150px;
            height: 150px;
            margin: 0px auto 0;
        }

        .logo img {
            width: 100%;
            height: 100%;
        }

        .name {
            margin: 10px 40px;
            text-align: center;
            font-size: 30px;
            font-weight: 700;
        }

        .desc {
            margin: 10px 40px;
            text-align: center;
            color: #717171;
            /*font-size: 16px;*/
        }

        .down-btn {
            width: 80%;
            margin: 30px auto;
        }

        .down-btn .btn {
            height: 50px;
            background: #1A79F9;
            border-radius: 10px;
            line-height: 50px;
            text-align: center;
            font-size: 18px;
            color: #fff;
            margin-top: 15px;
        }

        .not-btn {
            text-align: center;
            justify-content: center;
            margin-top: 20px;
        }

        .copyright {
            position: fixed;
            bottom: 40px;
            left: 20px;
            right: 20px;
            text-align: center;
            color: #777;
            /*font-size: 16px;*/
        }
    </style>
</head>

<body>
<div class="bg">
    <div class="logo"><img src="images/jfx-logo.png"/></div>
    <div class="name">君放心</div>
    <div class="desc">君放心一款订水APP，使用君放心能让你安心、快捷的订水！</div>
    <div class="down-btn">
        <div class="btn" onclick="down(2);">Android安卓版下载</div>
        <!--        <div class="btn" onclick="down(1);">苹果APP下载</div>-->
        <div class="not-btn">
            <a style="margin-top: 20px;" onclick="not_support()"><i class="iconfont icon-pingguo"></i>
                <del>苹果APP下载</del>
            </a>
        </div>
    </div>

    <div class="copyright">云南伴君盈科技有限公司 版权所有</div>
</div>
<img
        id="openinbrowser"
        class="openinbrowser"
        alt=""
        src="images/openinbrowser.png?t=12"
        style="z-index: 9999;display: none;width:100%;height:100%;margin:0;padding:0;position: fixed;left: 0;top:0;">

<script src="js/mui.min.js"></script>
<script type="text/javascript">
    var android = "https://water.wangmingshan.com.cn/download/app/user.apk";
    var ios = "https://apps.apple.com/cn/app/id1600199700";

    let agent = navigator.userAgent.toLowerCase();
    console.log(agent)

    if (agent.indexOf('iphone') > 1) {
        console.log('直接打开')

        setTimeout(() => {
            location.href = ios;
        }, 1000)
    }

    mui.init();

    function not_support() {
        mui.toast('此版本暂不支持下载', {
            duration: '2000',
            type: 'div'
        });
    }

    if (agent.match(/MicroMessenger/i) === "micromessenger" && agent.indexOf('android') > 1) {
        var mask = mui.createMask(function () {
            return false;
        });
        mask.show(); //显示遮罩
        document.getElementById('openinbrowser').style.display = "block";
    }

    function down(type) {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) === "micromessenger" && agent.indexOf('android') > 1) {
            var mask = mui.createMask(function () {
                return false;
            });
            mask.show(); //显示遮罩
            document.getElementById('openinbrowser').style.display = "block";
            return;
        }
        if (type === 1) {
            location.href = ios;
        } else {
            location.href = android;
        }
    }

    (function () {
        calc();

        function calc() {
            var html = document.documentElement || document.body,
                winW = html.clientWidth,
                desW = 750;

            var percent = winW / 750 * 100;

            html.style.fontSize = percent > 100 ? '100px' : percent + 'px';
        }

        window.addEventListener('resize', calc, false);
    })();
</script>
</body>
</html>
